﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="VitCode.Web.BackStageManagement.UserList" %>

<%@ Register Assembly="VitCode.Web.UI.PaginationGrid" Namespace="VitCode.Web.UI"
    TagPrefix="PaginationGrid" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../ScriptFiles/CSS/Main.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript">
        function Check() {
            var a = document.getElementsByTagName("input");
            for (var i = 0; i < a.length; i++) {
                if (a[i].type == "checkbox") {
                    if (a[i].checked == true)
                        return confirm('確認刪除嗎');
                }

            }
            alert("請選擇要刪除的用戶！");
            return false;

        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
   
        <table class="tableElse" style="border:1px solid #A8CFEB;margin-top:2px;width:100%"  >
            <tr >
                <td>
                    <font style="color: Black">您當前位置：後臺管理&nbsp;<img src="../Images/navigate.gif" alt="" href="#" />&nbsp;用戶管理</font>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblConditionMemo" runat="server">查詢條件：</asp:Label>
                    <asp:DropDownList ID="ddlCondition" runat="server">
                        <asp:ListItem Text="用戶編碼" Value="a.Code"></asp:ListItem>
                        <asp:ListItem Text="名稱" Value="a.Name"></asp:ListItem>
                        <asp:ListItem Text="所屬部門" Value="b.Name"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtValue" runat="server" Width="136px"></asp:TextBox>
                    <asp:RadioButton ID="rbtAmount" runat="server" Text="匹配" GroupName="1"></asp:RadioButton><asp:RadioButton
                        ID="rbtLike" runat="server" Text="模糊" GroupName="1" Checked="True"></asp:RadioButton>&nbsp;
                        
                    <asp:Button ID="btnQuery"  runat="server"   class="btn_mouseout"
                                onmouseover="this.className= 'btn_mouseover ' " onmouseout="this.className= 'btn_mouseout ' "
                                onmousedown="this.className= 'btn_mousedown '" 
                                onmouseup="this.className= 'btn_mouseup '"
                        Text="查詢" onclick="btnQuery_Click1" />&nbsp;&nbsp;
                    <asp:Button ID="btnRealDelete"  runat="server" class="btn_mouseout"
                                onmouseover="this.className= 'btn_mouseover ' " onmouseout="this.className= 'btn_mouseout ' "
                                onmousedown="this.className= 'btn_mousedown '" 
                                onmouseup="this.className= 'btn_mouseup '" OnClientClick="return Check();"
                        OnClick="btnRealDelete_Click" Text="刪除" Enabled="false" />&nbsp;&nbsp;
                    <asp:Button ID="btnAdd"  runat="server"   OnClick="btnAdd_Click" class="btn_mouseout" 
                                onmouseover="this.className= 'btn_mouseover ' " onmouseout="this.className= 'btn_mouseout ' "
                                onmousedown="this.className= 'btn_mousedown '" 
                                onmouseup="this.className= 'btn_mouseup '"
                        Text="添加" />&nbsp;&nbsp;
                    <asp:Button ID="btn_UserRoleAll" 
                        runat="server" OnClick="Button_UserGroupRole_Click"  
                        class="btn_mouseout"
                                onmouseover="this.className= 'btn_mouseover ' " onmouseout="this.className= 'btn_mouseout ' "
                                onmousedown="this.className= 'btn_mousedown '" 
                                onmouseup="this.className= 'btn_mouseup '"
                        Enabled="false" Text="角色設置" />&nbsp;&nbsp;
                </td>
            </tr>
            </table>
              
                    <PaginationGrid:PaginationGrid ID="ListGridInfo" runat="server" GridSelectedItemStyle_BackColor="SkyBlue"
                        AutoGenerateColumns="False" AutoSort="True" DataKeyField="id" InitPageSize="15" 
                        OnOnGridItemSelect="ListGridInfo_OnGridItemSelect" 
            ExportAllDataEnabled="True" 
            ononbeforeexportdata="ListGridInfo_OnBeforeExportData" 
            DataFileFormat="Excel" ExportCurrentPageDataEnabled="True">
                        <Columns>
                            <PaginationGrid:PaginationGridCheckColumn ClickScript="" DataField="Id" HeaderText="選擇" 
                                ShowHeadCheckBox="True" ShowLabel="False">
                            </PaginationGrid:PaginationGridCheckColumn>
                             <PaginationGrid:PaginationGridButtonColumn CommandType="Select" HeaderText="明細" Text="&lt;img src='/Images/edit.gif' border=0&gt;">
                            </PaginationGrid:PaginationGridButtonColumn>
                            <PaginationGrid:PaginationGridButtonColumn CommandType="Select" HeaderText="改密" Text="&lt;img src='/Images/edit.gif' border=0&gt;">
                            </PaginationGrid:PaginationGridButtonColumn>
                            <PaginationGrid:PaginationGridBoundColumn DataField="Code" HeaderText="用戶編碼">
                            </PaginationGrid:PaginationGridBoundColumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="Name" HeaderText="名稱">
                            </PaginationGrid:paginationgridboundcolumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="Number" HeaderText="員工編號">
                            </PaginationGrid:paginationgridboundcolumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="Email" HeaderText="Email">
                            </PaginationGrid:paginationgridboundcolumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="Mobile" HeaderText="手機號碼">
                            </PaginationGrid:paginationgridboundcolumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="UserGroup" HeaderText="所屬部門">
                            </PaginationGrid:paginationgridboundcolumn>
                            <PaginationGrid:paginationgridboundcolumn DataField="Role" HeaderText="角色">
                            </PaginationGrid:paginationgridboundcolumn>
                         </Columns>
                    </PaginationGrid:PaginationGrid>
         
        <br />
        
     
    </form>
</body>
</html>
